-
Notifications
You must be signed in to change notification settings - Fork 26
Changes for session and schema #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank you for taking the time to suggest improvements to this library.
I perfectly understand your point. We kept the following correspondance of concepts as it existed in the library originally developed by
So, if we consider that the catalog concept matches the Cassandra keyspace, what about the schema concept? Should we match it with the keyspace too? Why not... if we make it configurable to fit different needs like being compatible with Liquibase Cassandra. But I'm not sure it makes it clear to use it as the default implementation. I'll come back to it later.
Even if we'll never be JDBC compliant because Cassandra is obviously not SQL 92 compliant 😉, we try to stick as more as possible to the JDBC 4.3 API specifications. So, regarding the method
So, we expect to return 0 since the driver doesn't return the number of updated rows. But, once again, for specific needs, we could make it configurable. One solution would be to introduce a parameter
I don't see any inconvenient to add such a constructor.
You're right, probably an oversight after a big refactoring :) We can remove them. |
Please note I cleaned the unused code mentioned in your comment on the branch |
Have no idea why build pipeline fails and java.lang.IllegalAccessError: superclass access check failed: class org.apache.cassandra.utils.JMXServerUtils$JmxRegistry (in unnamed module @0x3498ed) cannot access class sun.rmi.registry.RegistryImpl (in module java.rmi) because module java.rmi does not export sun.rmi.registry to unnamed module @0x3498ed |
Here is what I got in the build pipeline:
I changed the configuration of the CI pipeline in Github actions to also build pull requests branches (I just updated the branch I guess the error you mentioned comes from your local build. This error could happen if you run tests with JDK 9+ and not allowing illegal accesses. Try to build using JDK8 or tell me how you launched the tests. |
Yes, you're right. JDK 1.8 works fine. Glad it worked, find some quirkies I've lost at first. I've left with one failure, I can see still Build pipeline failure |
Do you see the pipeline logs here: https://github.com/ing-bank/cassandra-jdbc-wrapper/actions/workflows/ci-workflow.yml ? For Azure pipeline, I restarted it, it failed when it checked-out the repo from Github... and now it succeeded. |
Yes, I can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be compliant with our contributing policy, please:
- add license headers in the new Java files
- add Javadoc on the public methods and constructors (you can find Checkstyle findings in the build logs)
- add unit tests for the new code each time it is possible
Thank you
src/main/java/com/ing/data/cassandra/jdbc/CassandraConnection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ing/data/cassandra/jdbc/CassandraConnection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ing/data/cassandra/jdbc/CassandraConnection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ing/data/cassandra/jdbc/CassandraConnection.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @mjok for your contribution!
Do not hesitate to create new discussions / pull requests if you detect new potential improvements.
This need a discussion first.
Background liquibase cassandra uses outdated Simba JDBC driver; This project would be perfect fit for replacing it.
First thing, there is different concepts about catalog, You use cluster as catalog, as liquibase (simba) expects keyspace. And thus ailing on some checks:
getColumns <..>
if (catalog != null && !catalog.equals(this.connection.getCatalog()))
The solution could be either make this configurable, or suggest another solution.
Update also need review. Your return 0, with -1 "liquibase cassandra" would work out of the box. Yet again, this can be made configurable.
And passing a session would benefit. Actually I'd like to use the session from my application, there all the security params already configured, and there is no need to open additional session, as I have already one Idle.
note:
seems to be unused variables
**sorry made a mess with previous pull request